﻿import { Component } from '@angular/core';

declare var $: any;

@Component({
	moduleId: module.id,
	selector: 'dx-applicatemanage',
	templateUrl: './applicatemanage.component.html'
})
export class ApplicateManageComponent {

    FullScreeToggle = function () {

        var backgroundColor = $('.content-wrapper').css('background');

        $('.fixed .content-wrapper').fullScreen({

            'background': backgroundColor,
            'marginLeft': 0,
            'paddingTop': 0,
            'callback': function (isFullScreen: boolean) {
                if (isFullScreen == true) {
                    $('.btn-group span').html('退出全屏').attr('title', '退出全屏');
                    $('.content-wrapper').css({ 'padding-top': 0, 'margin-left': 0 });
                    var height = $(window).height() - 192;
                    $('.box-body').slimScroll({ 'height': height });
                    return;
                }

                $('.btn-group span').html('全屏').attr('title', '全屏');
                $('.content-wrapper').css({ 'padding-top': '50px', 'margin-left': '230px' });
                var height = $(window).height() - 244;
                $('.box-body').slimScroll({ 'height': height });
            }
        });
    }
}